package com.coder.rental.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 车辆信息
 * </p>
 *
 * @author zty
 * @since 2024-12-20
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("auto_info")
@ApiModel(value = "AutoInfo对象", description = "车辆信息")
public class AutoInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("车辆信息id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("车辆号码")
    private String autoNum;

    @ApiModelProperty(" 厂商id")
    private Integer mid;

    @ApiModelProperty(" 品牌id")
    private Integer bid;

    @ApiModelProperty("车辆类型（0燃油，1电动，2混动）")
    private Boolean infoType;

    @ApiModelProperty("车辆颜色")
    private String color;

    @ApiModelProperty("汽车排量")
    private Double  displacement;

    @ApiModelProperty("排量计量单位（自然吸气、涡轮增压...）")
    private String unit;

    @ApiModelProperty("行驶里程")
    private Integer mileage;

    @ApiModelProperty("日租金")
    private Integer rent;

    @ApiModelProperty("上牌日期")
    private LocalDate registrationDate;

    @ApiModelProperty("车辆图片")
    private String pic;

    @ApiModelProperty("押金")
    private Integer deposit;

    @ApiModelProperty("状态（0未租出，1已租，2维保，3自用）")
    private Boolean status;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT) // mybatis-plus配置了自动填充功能
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("应保养次数")
    private Integer expectedNum;

    @ApiModelProperty("实际保养次数")
    private Integer actualNum;

    @ApiModelProperty("是否删除")
    private Boolean deleted;
}
